const { createProxyMiddleware } = require('http-proxy-middleware')
console.log('setup:', createProxyMiddleware)
  // "proxy": "http://api.expoon.com"
module.exports = function (app) {
  app.use(createProxyMiddleware('/api',
  {
    target: 'http://api.expoon.com',
    pathRewrite: {
      '^/api': '',
    },
    changeOrigin: true,
    secure: false, // 是否验证证书
    ws: false, // 启用websocket
  }))
};